#ifndef XCALLBLOCK_H
#define XCALLBLOCK_H
#include <xscript/xdefs.h>
#include <xscript/xcall.h>

class XCallBlock : public XCall {
  public:
    typedef std::shared_ptr<XCallBlock> XCallBlockPtr;
    XCallBlock() = delete;
    XCallBlock(std::shared_ptr<XToken> token);
    virtual ~XCallBlock() = default;
  public:
    void addCall(std::shared_ptr<XCall> call);
    virtual XCallType getType()const override;
    bool invoke(std::shared_ptr<XVariableTable> table) override;
  protected:
    std::vector<std::shared_ptr<XCall>> calls;
};

#endif // XCALLSET_H
